<template>
  <div>
    <el-container class="JGIndex-kuang">

      <el-aside width="250px" style="background-color: rgb(238, 241, 246)">

        <!--    :default-openeds="['1',]"     -->
        <el-menu 
          @select="handleSelect"
        >
          <el-menu-item :index="item.path" v-for="item in dataList" :key="item.path" >
            <template slot="title"><i :class="item.mate.icon"></i>{{item.mate.title}}</template>
            <el-menu-item v-if="item.children" :index="item2.path" v-for="item2 in item.children">{{ item2.mate.title }}</el-menu-item>
          </el-menu-item>

          <!-- <el-submenu index="2">
            <template slot="title"><i class="el-icon-menu"></i>预警管理</template>
              <el-menu-item index="2-1">选项1</el-menu-item>
              <el-menu-item index="2-2">选项2</el-menu-item>
              <el-menu-item index="2-3">选项3</el-menu-item>
            <el-submenu index="2-4">
              <template slot="title">选项4</template>
              <el-menu-item index="2-4-1">选项4-1</el-menu-item>
            </el-submenu>
          </el-submenu> -->

        </el-menu>
      </el-aside>

      <el-container class="rightContaniner">

        <el-header style="text-align: center; font-size: 17px; color: #484848; ">
          <!-- <el-dropdown>
            <i class="el-icon-setting" style="margin-right: 15px"></i>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>查看</el-dropdown-item>
              <el-dropdown-item>新增</el-dropdown-item>
              <el-dropdown-item>删除</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown> -->
          <span>全军总部</span>
          <!-- <el-button @click="toPush">tototo</el-button> -->
        </el-header>
        
        <el-main class="mainStyle">
          <!-- <el-table :data="tableData">
            <el-table-column prop="date" label="日期" width="140">
            </el-table-column>
            <el-table-column prop="name" label="姓名" width="120">
            </el-table-column>
            <el-table-column prop="address" label="地址">
            </el-table-column>
          </el-table> -->


          <router-view name="JGSystem"></router-view>
        </el-main>
      </el-container>
      
      <!-- <ContentT/> -->

    </el-container>
  </div>
</template>

<script>
import routes from '@/router/index';
import routes1 from '@/router/index';

export default {
  name: "JGIndex",
  components: {
    // MenuT: ()=> import('../JGList/layout/menu.vue'),
    // ContentT: ()=> import('../JGList/layout/content.vue'),
  },

  data() {
    const item = {
      date: '2016-05-02',
      name: '王小虎',
      address: '上海市普陀区金沙江路 1518 弄'
    };
    return {
      tableData: Array(20).fill(item),
      dataList: routes.options.routes[1].children,
      // dataList: routes1.options.routes1,

    };
  },
  mounted() {
    // console.log(routes.options.routes[1].children)
    // console.log(routes1.options.routes1)
  },
  
  methods: {
    handleSelect(e){
      console.log(e)
      this.$router.push({
        path: e,

      })
    },


    
  },
};
</script>

<style lang="less" scoped>

.el-header {
  background-color: #B3C0D1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}

.JGIndex-kuang{
  // height: calc(100%); 
  // border: 1px solid #eee
  width: 100%;
}
.rightContaniner{
  position: relative;
  height: calc(100vh);
  .mainStyle{
    // height: calc(100vh -60);
    position: absolute;
    top:60px;
    right: 0;
    left: 0;
    bottom: 0px;
    overflow-y: auto;
  }
}

</style>
